import Vue from 'vue'
const progressFill = {
  state: {
    pageData: {
      pageSize:'20',
      pageId:'1',
      search:{
        projectName:'',
        zone:'',
        projectStatus:'',
        piggeryType:'',
      }
    },
    siteDressData:{
      projectName:'',
      cProgressStatus:'',
      hProgressStatus:''
    },
    managerData:{
      name : '',
      zone : '',
      manager : '',
      projectStatus : '',
      piggeryType : ''
    },
    ofProjects:{
      name:'',
      zone:'',
      manager:'',
      status:''
    }
  },
  mutations: {
    PAGEDATA: (state, object) => {
      Vue.set(state.pageData = object)
      
      // Vue.set(state.typeCacheMap, object.key, object.value)
      
      console.log(state)
    },
    FILLPAGEDATA: (state, object) => {
      Vue.set(state.siteDressData = object)
    },
    MANAGERPAGEDATA: (state, object) => {
      Vue.set(state.managerData = object)
    },
    OFPROJECTPAGEDATA: (state, object) => {
      Vue.set(state.ofProjects = object)
    },
  },
  actions: {
    SET_PAGEDATA: ({commit}, object) => {
      
      commit('PAGEDATA', object)
    },

    SET_FILLPAGEDATA: ({commit}, object) => {
      commit('FILLPAGEDATA', object)
    },
    SET_MANAGERPAGEDATA: ({commit}, object) => {
      commit('MANAGERPAGEDATA', object)
    },
    SET_OFPROJECTPAGEDATA: ({commit}, object) => {
      commit('OFPROJECTPAGEDATA', object)
    },
  //   setCatch: ({commit}, object) => {
  //     commit('SET_CACHE', object)
  // },
  }
}

export default progressFill
